package me.goldze.mvvmhabit.http;

/**
 * Created by goldze on 2017/5/10.
 * 该类仅供参考，实际业务返回的固定字段, 根据需求来定义，
 */
public class BaseResponse<T> {
    private int errCode;
    private String errMsg;
    private T data;

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int code) {
        this.errCode = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isOk() {
        return errCode == 0;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String msg) {
        this.errMsg = msg;
    }
}
